fieldset {
  display: block;
  border: 0;
  padding: 0;
  margin: 0 0 30px 0;
  legend {
    font-size: 22px;
    font-weight: 300;
    margin: 0 0 15px 0;
  }
}

::placeholder {
  color: inherit;
  opacity: 1;
}

.customControl {
  display: block;
  width: 100%;
}

.fieldGroup {
  display: flex;
  margin: 0 -5px;
  min-height: $fieldHeight;
  place-items: center left;
  > * {
    margin: 0 5px;
    flex: 1 1 auto;
  }
  > label {
    width: 30%;
    flex: 0 0 auto;
    font-size: 14px;
    line-height: 1.3;
    color: #555;
    small {
      display: block;
      margin-top: 2px;
      opacity: .8;
      font-size: 12px;
      line-height: 1.3;
    }
    &[title] {
      cursor: help;
    }
  }
  > input,
  > select,
  > textarea,
  .inputColor,
  .inputColor__preview,
  .inputColor__code {
    display: block;
    width: 100%;
    height: $fieldHeight;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 7px;
    background: #fff;
    color: #202020;
    &:focus {
      outline: 0;
      box-shadow: $focus;
    }
    &:disabled {
      background: $optionsBg;
      color: #353535;
    }
  }

  > select {
    padding: 0 6px;
  }
  .inputColor {
    padding: 0;
    input[type="color"] {
      opacity: 0;
      cursor: pointer;
      height: 100%;
      width: 100%;
    }
  }
  &.fieldGroup--break {
    flex-wrap: wrap;
    > label {
      width: 100%;
      margin-bottom: 5px;
    }
  }
  .labelIcon {
    width: 28px;
  }
  .fieldMd {
    width: 75%;
    flex: 0 0 auto;
  }
  .fieldSm {
    width: 50%;
    flex: 0 0 auto;
  }
  .fieldXs {
    width: 25%;
    flex: 0 0 auto;
  }
}

.fieldInfo {
  font-size: 13px;
  line-height: 1.4;
  color: #555;
}

.field {
  display: grid;
  grid-template: 25px #{$fieldHeight} / 1fr;
  grid-gap: 0;
  margin: 0;
  place-items: center left;
  > label {
    font-size: 11px;
    text-transform: uppercase;
    color: #555;
    padding-left: 1px;
  }
  > input,
  > select,
  > textarea,
  > .inputColor {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 7px;
    background: #fff;
    color: #202020;
    &:focus {
      outline: 0;
      box-shadow: $focus;
    }
    &:disabled {
      background: $optionsBg;
      color: #353535;
    }
  }
  > select {
    padding: 0 6px;
  }
  .inputColor {
    padding: 0;
    input[type="color"] {
      opacity: 0;
      cursor: pointer;
      height: 100%;
      width: 100%;
    }
  }
  > * {
    grid-row: 2 / 3;
  }
  > label {
    grid-row: 1 / 2;
  }
  > .valMsg {
    grid-row: auto;
  }
  &.noLabel {
    grid-template: #{$fieldHeight} / auto;
    grid-auto-flow: column;
    > * {
      grid-row: 1 / 2;
      grid-column: 1 / 2;
    }
    > .valMsg {
      grid-row: auto;
    }
  }
  &.btns {
    display: flex;
  }
  &.compact {
    grid-template: #{$fieldHeight} / auto 1fr;
    grid-auto-flow: column;
    > * {
      grid-row: 1 / 2;
      grid-column: 2 / 3;
    }
    > label {
      grid-row: 1 / 2;
      grid-column: 1 / 2;
      display: grid;
      place-items: center center;
    }
    > .valMsg {
      grid-column: 2 / 3;
      grid-row: 2 / 3;
    }
  }
  &.compactIcon {
    grid-template: #{$fieldHeight} / 31px 1fr;
    > * {
      grid-row: 1 / 2;
      grid-column: 2 / 3;
    }
    > label {
      grid-row: 1 / 2;
      grid-column: 1 / 2;
      display: grid;
      place-items: center center;
      .icon {
        width: 24px;
        text-align: center;
        margin-right: 7px;
      }
    }
    > .valMsg {
      grid-column: 2 / 3;
      grid-row: 2 / 3;
    }
  }
  &.reverse {
    > * {
      grid-row: 1 / 2;
    }
    > label {
      grid-row: 2 / 3;
    }
  }
  &.reverse.compact,
  &.reverse.compactIcon {
    > * {
      grid-row: 1 / 2;
      grid-column: 1 / 2;
    }
    > label {
      grid-row: 1 / 2;
      grid-column: 2 / 3;
    }
  }
}

input[type='file'] {
  display: none;
}
